package com.dachuang.canjiren.mapper;

import com.dachuang.canjiren.entity.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dachuang.canjiren.entity.VO.CommentVO;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author testjava
 * @since 2020-07-27
 */
@Repository
public interface CommentMapper extends BaseMapper<Comment> {

    /**
     * 插入评论
     * @param comment
     * @return
     */
    int insertComment(Comment comment);


    /**
     * 查询活动下的评论
     * @param volunteerId
     * @return
     */
    List<CommentVO> selectCommentList(Integer volunteerId);

    /**
     * 查询评论的评论
     * @param mainId
     * @return
     */
    List<CommentVO> selectCommentChildrenList(Integer mainId);

}
